<!doctype html>
<html>
<head>
	<title>Bookmarks Tagger Options</title>
	<meta charset="utf-8">
	<script src="global.js"></script>
	<script src="options.js"></script>
	<style>
	@font-face {
		font-family: 'Open Sans';
		font-style: normal;
		font-weight: 400;
		src: local('Open Sans'), local('OpenSans'), url(media/OpenSans-Normal.woff) format('woff');
	}

	body {
		font: 13px/22px 'Open Sans', arial, sans-serif;
		margin: 0;
		padding: 8px;
	}

	input {
		border: 1px solid #7ea0cd;
		font-size: 100%;
		padding: 4px;
		font: 13px/22px 'Open Sans', arial, sans-serif;
	}

	input:focus { 
		outline: none;
		border-color: #7c4790;
		box-shadow: 0 0 6px #7ea0cd;
	}
	
	input:disabled {
		background-color: #f0f0f0;
	}
	
	button, button:disabled:active, button:disabled:hover {
		box-shadow: inset 0 1px 0 rgba(256, 256, 256, .75);
		background-color: #c0c0c0;
		border-color: #c0c0c0 #959595 #959595 #c0c0c0;
		border-width: 1px;
		border-style: solid;
		color: #000;
		text-shadow: 0 -1px 0 rgba(255, 255, 255, .5);
		background-image: linear-gradient(to bottom, #f0f0f0 0, #c0c0c0 100%);
		background-image: -webkit-linear-gradient(top, #f0f0f0 0, #c0c0c0 100%);
		outline: 0;
		font-weight: normal;
		padding: 4px 8px 4px 8px;
		font: 13px/22px 'Open Sans', arial, sans-serif;
	}
	
	button:hover {
		box-shadow: 0 0 6px #c0c0c0;
		background-image: -webkit-linear-gradient(to bottom, #c0c0c0 0, #c0c0c0 100%)
	}
	
	button:active {
		border-color: #959595 #c0c0c0 #959595 #c0c0c0;
		box-shadow: inset 0 1px 4px rgba(0, 0, 0, .35), 0 1px 0 #fff;
		background-image: linear-gradient(to bottom, #c0c0c0 0, #f0f0f0 100%);
		background-image: -webkit-linear-gradient(top, #c0c0c0 0, #f0f0f0 100%);
	}
	
	button:disabled, button:disabled:hover {
		color: #a0a0a0;
	}
	
	fieldset {
		border-width: 1px 1px 2px 1px;
		border-style: solid;
		border-color: #7c4790;
		margin-bottom: 12px;
		position: relative;
	}
	
		
	legend {
		font-weight: bold;
		color: #7c4790;
	}
	
	a {
		text-decoration: underline;
		cursor: pointer;
	}

    abbr {
        border-bottom: 1px dotted black;
        cursor: help;
    }
	
	.clear {
		clear: both;
	}
		
	.left-panel {
		float: left;
		width: 190px;
	}
	
	.left-panel fieldset {
		width: 150px;
	}
	
	.controls {
        margin-top: 10px;
		text-align: center;
	}
	
	.controls button {
		width: 135px;
	}
	
	.tag-list {
		background-color: #fff;
		max-height: 250px;
		overflow: hidden;
		-webkit-transition: max-height 400ms ease 0;
	}
	
	.tag-list:hover {
		max-height: 2000px;
	}
	
	.tag-list:hover #tag-list-more {
		display: none;
	}
	
	#tag-list-more {
		text-align: center;
		position: absolute;
		bottom: 0;
		width: 150px;
		background-color: #fff;
		color: #000;
		display: block;
	}

	#tag-list a {
		color: #fff;
		background-color: #7ea0cd;
		border: 1px solid #7ea0cd;
		margin: 0 4px 4px 0;
		padding: 1px 2px 1px 2px;
		cursor: pointer;
		text-decoration: none;
		float: left;
		line-height: 16px;
	}
	
	.search {
		float: left;
		width: 720px;
		padding: 0;
		background-color: #fbf7fd;
	}
		
	.search legend {
		margin-left: 9px;
	}
	
	.search-input-block {
		padding: 9px 9px 9px 36px;
		margin-bottom: 10px;
	}

	#input_search {
		background-image: none;;
		background-position: 236px;
		background-repeat: no-repeat;
		width: 270px;
	}
	
	p.small {
		font-size: smaller;
		line-height: 12px;
		padding: 0;
	}

	#popup_menu {
		background-color: #fbf7fd;
		border: 1px solid #7ea0cd;
		padding: 8px;
		position: absolute;
		left: 630px;
		top: 30px;
		-webkit-transition: all 200ms;
	}
	
	#popup_menu:hover {
		left: 917px;
		-webkit-box-shadow: inset 0 0 6px 1px #7ea0cd;
		border-color: #fbf7fd;
	}
	
	#popup_menu button {
		float: left;
		text-align: center;
	}
	
	#button_add {
		float: right;
	}
	
	#button_show_all {
		float: right;
	}
	
	
	/* Search results table */
	
	#results {
		border-top: 1px solid #7c4790;
		width: 720px;
		border-spacing: 0;
		border-collapse: collapse;
		font-size: 100%;
		display: block;
		background-color: #fff;
	}
	
	#results th {
		text-align: left;
	}
	
	#results td {
		padding: 2px 2px 2px 4px;
		vertical-align: top;
	}
	
	#results td span {
		padding-left: 4px;
	}

	#results td.title {
		border-right: 1px solid #7c4790;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		width: 447px;
	}
	
	#results td.actions {
		padding-left: 6px;
	}
	
	#results td.actions a {
		text-decoration: none;
		color: #a0a0a0;
		visibility: hidden;
		font-size: 120%;
	}
	
	#results td.actions a:hover {
		color: #7c4790;
		cursor: pointer;
	}
	
	#results tr:hover td.actions a {
		visibility: visible;
	}
	
	#results td.title {
		max-width: 440px;
	}
	
	#results td.title a {
		color: blue;
	}
	
	#results td.title span {
		color: #a0a0a0;
		text-decoration: underline;
		font-size: smaller;
	}
	
	#results td.tags {
		width: 230px;
		max-width: 220px;
		line-height: 16px;
	}

	#results td.no-results {
		text-align: center;
		width: 720px;
		padding: 10px 0;
	}
	
	
	/* Add / Edit bookmark form */
	
	#add {
		border-top: 1px solid #7c4790;
		width: 720px;
		border-spacing: 0;
		border-collapse: collapse;
		display: none;
		background-color: #fff;
	}
	
	#add td {
		padding: 2px;
	}
	
	#add td.first {
		width: 185px;
	}
	
	#add td.title {
		width: 30px;
		font-weight: bold;
		color: #7c4790;
		text-align: right;
	}
	
	#add th {
		font-size: 110%;
	}
	
	#add td#add-tags {
		padding-left: 5px;
	}
	
	#add td#add-tags a {
		color: #fff;
		background-color: #7ea0cd;
		border: 1px solid #7ea0cd;
		margin-right: 4px;
		padding: 1px 2px 1px 2px;
		cursor: pointer;
		text-decoration: none;
	}
	
	#add td#add-tags a:after {
		/* 
		ballot x 
		content: '\0000a0☒';
		*/
		content: '\0000a0✗';
	}
	
	#add td#add-tags a:hover {
		background-color: #fff;
		color: #7ea0cd;
	}
	
	#add tfoot tr td {
		height: 16px;
	}
	
	#add thead tr th {
		height: 36px;
	}
	
	.tags a {
		color: #fff;
		background-color: #7ea0cd;
		border: 1px solid #7ea0cd;
		margin: 1px 4px 1px 0;
		padding: 1px 2px 1px 2px;
		float: left;
		text-decoration: none;
	}
	
	#add_remove {
		cursor: pointer;
		text-decoration: underline;
		color: blue;
		float: right;
	}
	
	#add_input_url {
		background-image: none;;
		background-position: right;
		background-repeat: no-repeat;
	}
	
	#infobox {
		font-size: smaller;
		margin-left: 8px;
		color: red;
		float: right;
		position: relative;
		display: none;
		top: 5px;
		line-height: 10px;
	}

	#x-in-search {
		position: absolute;
		padding: 4px;
		background-color: #fff;
		margin-left: 255px;
		margin-top: -33px;
		cursor: pointer;
		color: #CDC9C9;
		font-size: 130%;
		-webkit-transition: color 250ms ease 0;
		display: none;
	}
	
	#x-in-search:hover {
		color: #f00;
	}
	</style>
</head>
<body>
	<div class="left-panel">
		<fieldset class="options">
			<legend>Options</legend>
			<abbr title="Unfortunately there is no possibility to allow users to change the keyword due to chrome extension API limitations. I hope this will change in the future.">
                Omnibox keyword: <strong>bt</strong>
            </abbr>

			<div class="controls">
				<button id="button_import">import bookmarks</button>
				<button id="button_remove_all">remove all</button>
			</div>
		</fieldset>
		
		<fieldset class="tag-list">
			<legend>Used tags</legend>
			<div id="tag-list"></div>
		</fieldset>
	</div>
	
	<fieldset class="search">
		<legend>Search and manage my bookmarks</legend>
		
		<div class="search-input-block">		
			<input type="text" name="search" placeholder="Search by tags" id="input_search" value="" autofocus />
			<div id="x-in-search">✗</div>
			<button id="button_search">search</button>
			
			<button id="button_add">add new</button>
			<button id="button_show_all">show all</button>
		</div>
		
		<table id="add">
			<thead>
				<tr>
					<th class="first"></th>
					<th colspan="2"><a id="add_remove">remove</a><span id="add_title">Edit an existing bookmark</span></th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="first"></td>
					<td class="title">Url:</td>
					<td class="input"><input type="text" id="add_input_url" size="33" value="http://" /><span id="infobox">Bookmark already<br>exists. <a id="infobox_edit">Edit it</a>.</span></td>
				</tr>
				<tr>
					<td class="first"></td>
					<td class="title">Title:</td>
					<td class="input"><input type="text" id="add_input_title" size="33" disabled /></td>
				</tr>
				<tr>
					<td class="first"></td>
					<td class="title">Tags:</td>
					<td class="input"><input type="text" id="add_input_tags" size="33" disabled /><button id="add_button_save">save</button></td>
				</tr>
				<tr>
					<td class="first"></td>
					<td></td>
					<td id="add-tags"></td>
				</tr>
			</tbody>
			<tfoot><tr><td></td></tr></tfoot>
		</table>
		
		<table id="results">
			<tbody id="results_tbody">
			</tbody>
		</table>
		
	</fieldset>
</body>
</html>
